package com.rwdesign.springboot.Waimai.service;


import com.rwdesign.springboot.Waimai.entity.Goods;
import com.rwdesign.springboot.Waimai.entity.Shop;

import java.util.List;

/**
 * @author rystart
 * @create 2022-01-28 14:04
 */
public interface GoodsService {


    /**
     * @Description: 查询商品所有分类
     * @Param:
     * @return:
     * @Author: cdp
     * @Date: 2022/1/28
     */
    List<String> selectAllGoodsTypes(Integer shopId);

    /**
     * @return
     * @Author chendanping
     * @Description //TODO 查询商品，通过id
     * @Date 11:21 2022/3/6
     * @Param
     **/
    Goods selectGoodsById(Integer goodsId);

    /**
     * @return
     * @Author chendanping
     * @Description //TODO 查詢商品
     * @Date 21:39 2022/3/2
     * @Param
     **/
    List<Goods> selectAllGoods(String goodsType, Integer shopId);


    /**
     * 新增商品
     *
     * @param goods
     * @return
     */
    Integer addGoods(Goods goods);

    /**
     * @return
     * @Author chendanping
     * @Description //TODO 删除商品通过id
     * @Date 11:20 2022/3/6
     * @Param
     **/
    Integer deleteGoodsById(Integer goodsId);

    /**
     * 编辑商品
     * @param goods
     * @return
     */
    Integer updataGoods(Goods goods);

    /**
     * @Author chendanping
     * @Description //TODO 查询商品所属的shopId
     * @Date 20:41 2022/3/8
     * @Param
     * @return
     **/
    Integer selectShopIdByGoodsId(Integer goodsId);

}
